<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<title>操作员管理</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<link href="${ctx}/css/style.css" rel="stylesheet" type="text/css">
<body>
	<script language="JavaScript">
		function check() {
            if (form1.loginName.value == 0) {
                alert("请输入用户名");
                form1.loginName.focus();
                return;
            }
            if (form1.password.value == 0) {
                alert("请输入密码");
                form1.password.focus();
                return;
            }
            if(form1.email.value==0)
            {
                alert("请输入邮箱");
                form1.password.focus();
                return;
            }
            if (form1.newpw2.value == 0) {
                alert("请再次输入密码");
                form1.password.focus();
                return;
            }
            if(form1.name.value == 0)
            {
                alert("请输入姓名");
                form1.name.focus();
                return;
            }
            if (form1.password.value != form1.newpw2.value) {
                alert("两次密码输入不一致,请从新输入");
                form1.password.value = "";
                form1.newpw2.value = "";
                return;
            }
			form1.submit();
		}
	</script>
	<table width="584" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td height="27" colspan="6" bgcolor="#EEEEEE" class="tableBorder_gray">&nbsp;<span class="word_deepgrey">
					当前位置：系统设置> </span>操作员管理 &gt;&gt;&gt;
			</td>
		</tr>
		<tr>
			<td height="40"></td>
		</tr>
		<tr>
			<td valign="top" height="83">
				<table width="100%" height="112" border="0" cellpadding="0" cellspacing="0">
			<form name="form1" action="${ctx}/userAction.do?method=addUser" method="post">
			<input type ="hidden" name="userid" value = "${userid}"></input>
			<tr>
				<td align="center">登陆名：</td> 
				<td><input type ="text" name="loginName" value = "${loginName}"></input><input type="text" name="failloginName" value="${failloginName}" ></input>
                </td>
			</tr>
			<tr>
                <td align="center">用户真名：</td> <td> <input type="text" name="name" value="${name}"></input>
                </td>
            </tr>
           <tr>
                <td align="center">用户邮箱：</td> <td> <input type="text" name="email" value="${email}"></input>
                </td>
            </tr>
           <tr>
                <td align="center">手机号：</td> <td> <input type="text" name="mobilenumber" value="${mobilenumber}"></input>
                </td>
            </tr>
            <tr>
                <td align="center">角色</td>
                <td>
                
                <select name="roleId">
                <c:forEach var="role" items="${roles }">
                            <option value="${role.roleId }">${role.name }</option>
                        </c:forEach>
                </select>
                </td>
            </tr>
			<tr>
				<td align="center">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码： </td> <td><input type="password"  name="password" value="${password}"></iput> 
				</td>
			</tr>
			<tr>
				<td align="center">确认新密码： </td> <td>
                <input name ="newpw2" type="password" value="${password}"></input> 
                </td>
			</tr>
            <tr>
            <td height="40"></td>
            </tr>
			<tr>
				<td align="center"><input name="submit1" type="button"
					class="btn_grey" value="确认" onClick="check()"> &nbsp;
			    </td>
				<td> 
					 <a href="userexit.jsp">退出系统</a>
				</td>
			</tr>
			 <tr>
            <td height="40"></td>
            </tr>
            <tr>
             <td>
			<div><span></span></div>
			</td>
			</tr>
     </form>
		</table>
			</td>
		</tr>
	</table>
</body>
</html>